#include "Explode.h"

CExplode::CExplode(void)
{
}

CExplode::~CExplode(void)
{
}

void CExplode::AddExplode(hgeAnimation* a, float x, float y)
{
	CTankExplode* s = new CTankExplode(a,x,y);
	s->explode.Play();
	m_listExplode.push_back(s);
}

void CExplode::DoFrame(float dt)
{
	for(std::list<CTankExplode* >::iterator it = m_listExplode.begin(); it != m_listExplode.end(); it++)
	{
		if((*it)->explode.IsPlaying())
			(*it)->explode.Update(dt);
	}
}

void CExplode::DoRender()
{
	for(std::list<CTankExplode* >::iterator it = m_listExplode.begin(); it != m_listExplode.end(); it++)
	{
		if((*it)->explode.IsPlaying())
			(*it)->explode.Render((*it)->x,(*it)->y);
	}
}